import request from "@/utils/request";

// 订单管理 - 订单列表
export function getOrderList(query) {
  return request({
    url: "/cms-shop/api/order-base/list",
    method: "get",
    params:query,
  });
}

// 订单管理 - 订单列表 - 详情
export function getOrderDetail(query) {
  return request({
    url:`/cms-shop/api/order-base/${query.id}`,
    method: "get",
    params:query,
  });
}

// 订单管理 - 订单列表 - 不同订单状态查询
export function getOtherList(query) {
  return request({
    url:`/cms-shop/api/order-base/check-and-accept`,
    method: "put",
    params:query,
  });
}

// 订单列表 - 获取快递公司
export function getCompanyList(query) {
  return request({
    url: "/cms/api/order-base/delivery-company-list",
    method: "get",
    params:query,
  });
}
// 订单列表 - 发货
export function sendGoods(data) {
  console.log(data)
  return request({
    url: "/cms-shop/api/order-base/send-out",
    method: "put",
    data:data,
  });
}
// 品牌订单列表 - 退款
export function refundApi(data) {
  console.log(data);
  return request({
    url:`/cms-shop/api/order-base/refund`,
    method: "put",
    data:data,
  });
}